/*
 * Copyright (c) 2011. This file is public under GPLv3 license.
 * For more information about license please refer to http://www.gnu.org/licenses/gpl.html
 */

package com.freetools.watchdog.model;

import java.io.IOException;

/**
 * Date: Feb 19, 2011
 *
 * @author Michael Morozov
 */
public interface IPiece
{
    ISource getSource();

    long getFrom();

    long getLength();

    long getTo();

    IPiece setFrom(long from);

    IPiece setTo(long to);

    String getCachedValue() throws IOException;

    IPiece resetCache();

    IPiece markAsUsed();

    boolean isUsed();

    IPiece copy();

}
